/*-------------------------------------------------------------------------
*************************************************************************
 * @doc SPDH
 * @module pspup.h |  
 *  Prototypes for SPDH packet building functions.
 *
 * Product     :   SoftPay 2000 (Global Payment Methodology).
 * <nl>Developer   : SoftPay 2000 team  
 * <nl>Notes       :
 *
 * @head3 SPDH Functions |
 * @index | SPDH
 * @end
 *
 * Copyright (c) 1996-2000 by VeriFone Inc. All rights reserved.
 * 
 * No part of this software may be used, stored, compiled, reproduced,
 * modified, transcribed, translated, transmitted, or transferred, in any form 
 * or by any means whether electronic, mechanical, magnetic, optical, 
 * or otherwise, without the express prior written permission of VeriFone, Inc.
 *
 * Revision History
 * ------------------------------------------------------------------------
 $Log:  $
 * ------------------------------------------------------------------------
 ********************************************************************************/
#ifndef PSPUP_H
#define PSPUP_H

#ifdef SPDH_DEFINED

#include <spdh.h>

int inLoadSPDHPacket (char *pFieldId, char *szXmitBuffer);
int inUnloadSPDHResponse (TRANSACTION_OBJECT *pobTran, char *szRecVSuffer);
int inAllocateSPDHSendTransaction(TRANSACTION_OBJECT *pobTran, char *pFieldIdArray);
int inAllocSPDHField(int inIndex, VS_BOOL fIsRequest, int inSize);
void vdFreeSPDHFieldReferences(void);
void vdLoadSPDHField (char chFieldId, char *pszField,char chPadFlag, FHANDLE hFHandle);
void vdUnLoadSPDHField (char chFieldId, char *pszField, FHANDLE hFHandle);
void vdClearSPDHFieldReferences(void);
int inSPDHPack (TRANSACTION_OBJECT *pobTran, char *pchReqPacket, char *pszTermId);
VS_BOOL fSPDHUnpack (TRANSACTION_OBJECT *pobTran, char *pchRespPkt, int inRespSize, char *pchRespCode);
char *pchGetSPDHFieldAddr (char chFieldId, VS_BOOL fIsRequest);
int inGetSPDHFieldIndex (char chFieldId);
void vdInitSPDHFieldID (void);
void vdMakeSPDHHeader (TRANSACTION_OBJECT *pobTran,SPDH_HEADER *psrHeader,char *pszTermId,char chMsgType,int  inTranCode);

#endif

#endif
